package com.jt.controller;

import com.jt.pojo.Log;
import com.jt.service.LogService;
import com.jt.vo.PageResult;
import com.jt.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("log")
public class LogController {
    @Autowired
    private LogService logService;

    @GetMapping("list")
    public SysResult getCustomerList(PageResult pageResult){
        System.out.println(pageResult);
        pageResult = logService.getlogList(pageResult);
        System.out.println(pageResult);
        return SysResult.success(pageResult);
    }



    @DeleteMapping("/{id}")
    public SysResult deletelogId(@PathVariable  Integer id){
        logService.deletelogId(id);
        return SysResult.success();

    }

}
